package com.cw.controller;

import com.cw.beans.Zc_Type;
import com.cw.mapper.TypeMapper;
import com.cw.service.TypeService;
import org.springframework.beans.TypeMismatchException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.ArrayList;

@Controller
public class TypeController {
    @Autowired
    private TypeMapper typeMapper;
    //ajax获取资产类型的下拉列表回显
    @ResponseBody
    @RequestMapping("/gettype")
    public ArrayList<Zc_Type> gettype(){
        ArrayList<Zc_Type> zcType = typeMapper.gettype();
        System.out.println(zcType);
        return zcType;
    }
}
